package cc.telecomdigital.tdstock.testcase;

import java.util.Map;

import cc.mango.common.HttpUtils;
import cc.telecomdigital.tdstock.DateUtils;
import cc.telecomdigital.tdstock.StringUtils;
import cc.telecomdigital.tdstock.SystemInfo;
import cc.telecomdigital.tdstock.Framework.UniqueItem.TDStockLog;
import junit.framework.Assert;
import android.content.Context;
import android.test.AndroidTestCase;


public class ServerTimeTestCase extends AndroidTestCase
{

	public void testSererTime0() throws Throwable
	{
		String serverTime = SystemInfo.getServerTime(null, null);
		TDStockLog.d("ServerTimeTestCase","Server Time:"  +serverTime );
		Assert.assertTrue(  serverTime.startsWith("201108"));
	}
	
	
	public void testSererTime1() throws Throwable 
	{
		String url = "http://quotedev3.telecomdigital.cc/iphone/getTime.do?bkdr=tslsit_9959";
		String responseTxt = StringUtils.inputStreamToString(HttpUtils.urlToStream(url));
		Assert.assertTrue(  responseTxt.indexOf("201108") >= 0);
	}
	
		
}
